#include "G4ThreeVector.hh"
#include <iostream>
#include <fstream>

class KSADAnalyzeMessenger;
class KSADAnalyzeEvent;
class TH3D;
class TH2D;
class TApplication;
class TFile;

class KSADAnalyze
{
	public:
					KSADAnalyze();
					~KSADAnalyze();

		void 			Analyze();
		
		void 			Visualize();
		TH3D* 			GetH3();
		KSADAnalyzeEvent**	GetEventList();
		int			GetNumEvents();
		double			GetMaxValue();

	private:
		int 			IdentifyEvents();
		int** 			AddToList(int**,int&,int,int,int);
		bool 			InList(int**,int,int,int,int);

		TH3D* 			h3;
		KSADAnalyzeEvent** 	eventList;
		int 			numberOfEvents;
		KSADAnalyzeMessenger* 	messenger;
		double			maxValue;
};
